#!/bin/bash
# testing if you can read a file
pwfile="/etc/shadow"

if [ -f $pwfile ];then
    echo "$pwfile is a file"
    if [ -r $pwfile ];then
        tail $pwfile
    else
        echo "Sorry, I am unable to read the $pwfile file."
    fi
else
    echo "Sorry, the file $pwfile does not exists."
fi

